﻿package com.bluediesel.utils.managers.scenemanager.commands.display {
	import com.bluediesel.utils.managers.scenemanager.commands.Command;
	
	import flash.display.DisplayObject;
	import flash.display.DisplayObjectContainer;
	
	//This command encapsulates the addChild() method
	public class AddChild extends Command {
		
		public var container:DisplayObjectContainer;
		
		public function AddChild(container:DisplayObjectContainer, obj:Object) {
			super(obj);
			this.container = container;
		}
		
		override protected function execute(obj:Object = null):void {
			container.addChild(obj as DisplayObject);
		}
	}
}